package com.example.springbootmqdemo.task;

import org.springframework.amqp.rabbit.core.RabbitTemplate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

import java.sql.ClientInfoStatus;
@Component
@EnableScheduling
public class OrderTaskService {

    @Autowired
    RabbitTemplate rabbitTemplate;


    @Scheduled(cron = "0 46 11 21 10 ?")
    public void executeData() throws Exception {
       //把消息冗余中 status = 0的查出来 重新发送到 MQ中
        // rabbitTemplate.convertAndSend("exchage", "", list);
    }

}
